package edu.washington.ling.syntric.struct.projection;

import java.util.List;
import java.util.LinkedList;

import edu.washington.ling.syntric.struct.rule.UniPSPattern;
import edu.washington.ling.syntric.struct.tree.Node;


public class UniProjectionAssembly {
	
	private List<ProjectionNode> uniProjChains = new LinkedList<ProjectionNode>();
	public void addProjectionsFromPSPatts(List<UniPSPattern> psPatts, String posTag, int index) {
		for (UniPSPattern psPatt: psPatts) {
			List<String> psRootStrs = new LinkedList<String>();
			for (Node psRootElem: psPatt.getRootChain()) {
				psRootStrs.add(psRootElem.getLabel());
			}
			ProjectionNode projNode = new UniProjectionNode(psRootStrs, posTag, index);
			uniProjChains.add(projNode);
		}
	}
	public List<ProjectionNode> getProjectionChains() {
		return uniProjChains;
	}
}
